home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gnat1792.zip / gnat179b / examples / hello.adb < prev    next >
Text File  |  1994-05-13  |  660b  |  29 lines

  1. With IO; use IO;
  2. procedure Hello is
  3.    C : Character;
  4.    I : Integer;
  5.    S : String (1 .. 100);
  6. begin
  7.    Put_Line ("Hello. Welcome to the GNAT IO example" & "!");
  8.    Put ("Please enter a single character now followed by <CR> ");
  9.    Get (C);
  10.    Put ("Your character is: ");
  11.    Put (C);
  12.    Get (C);  --  read the <CR>
  13.    New_Line (2);
  14.  
  15.    Put ("Please enter a String now followed by <CR> :");
  16.    Get_Line (S, I);
  17.    Put ("Your String is : ");
  18.    Put_Line (S (1 .. I));
  19.    Put ("Its length is : ");
  20.    Put (I);
  21.    New_Line (2);
  22.  
  23.    Put ("Please enter an integer now followed by <CR> ");
  24.    Get (I);
  25.    Put ("Your number is: ");
  26.    Put (I);
  27.    New_Line (2);
  28. end; 
  29.